package com.peng.mapper;

import com.peng.pojo.User;
import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

public class UserMapperImp extends SqlSessionDaoSupport implements UserMapper {
    SqlSession sqlSession = getSqlSession();
    UserMapper mapper = sqlSession.getMapper(UserMapper.class);
    public List<User> selectUser() {
        return mapper.selectUser();
    }

    public int addUser(User user) {
        return mapper.addUser(user);
    }

    public int deleteUser(int id) {
        return mapper.deleteUser(id);
    }
}
